﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Moon.Sql.Test
{
    [MoonTable("t_moon_user")]
    public class User
    {
        [MoonKey]
        public string Id { get; set; }

        public string Account { get; set; }

        public string Password { get; set; }

        public string NickName { get; set; }

        public string Mobile { get; set; }

        public string Email { get; set; }

        public string Expire { get; set; }

        public int? Flag { get; set; }// = 1;

        public int? UserType { get; set; }

        public string Icon { get; set; }

        public DateTime CreateDate { get; set; }// = DateTime.Now;

        public string CreatorId { get; set; }

        public DateTime? ModifyDate { get; set; }

        public string Modifier { get; set; }

        public string Version { get; set; }

        [MoonColumn("Expire")]
        [MoonIgnored]
        public string ExpireX2 { get; set; }

        [MoonIgnored]
        public string CreateDate2 { get; set; }
        [MoonIgnored]
        public string CreateDate3 { get; set; }
        [MoonIgnored]
        public int RoleId { get; set; }
    }

    public class TempTableUser
    {
        public string Id { get; set; }

        public string Account { get; set; }

        public string NickName { get; set; }

        public string Mobile { get; set; }

        public string Email { get; set; }
    }

    [MoonTable("t_moon_user")]
    public class User2
    {
        [MoonKey]
        public string Id { get; set; }

        public string Account { get; set; }

        public string Password { get; set; }

        public string NickName { get; set; }

        public string Mobile { get; set; }

        public string Email { get; set; }

        public string Expire { get; set; }

        public int? Flag { get; set; }// = 1;

        public int? UserType { get; set; }

        public string Icon { get; set; }

        public DateTime CreateDate { get; set; }// = DateTime.Now;

        public string CreatorId { get; set; }

        public DateTime? ModifyDate { get; set; }

        public string Modifier { get; set; }

        public string Version { get; set; }
    }

    [MoonTable("t_moon_user_role")]
    public class UserRole
    {
        [MoonKey]
        [MoonSequence("SEQ_LOG")]
        [MoonIdentity]
        public int Id { get; set; }
        public string UserId { get; set; }
        public int RoleId { get; set; }
    }

    [MoonTable("t_moon_role")]
    public class Role
    {
        [MoonKey]
        [MoonSequence("SEQ_LOG")]
        [MoonIdentity]
        public int Id { get; set; }
        public string RoleCode { get; set; }
        public string RoleName { get; set; }
    }

    public class UserDto
    {
        public string Id { get; set; }

        public string Account { get; set; }

        public string NickName { get; set; }

        public string RoleCode { get; set; }

        public string RoleName { get; set; }

        public string x1 { get; set; }

        public string BeginDate { get; set; }

        public string EndDate { get; set; }
    }

    public class t_xxx
    {
        public Guid Guid { get; set; }
        public long id { get; set; }
        public char code { get; set; }
        public decimal amount { get; set; }
        public double price { get; set; }
    }
}
